< previous page page_571 next page >

Page 571
0571-01.jpg
Figure 16.5
The lighting model's distance term gives parallel
faces slightly different colors.
While most objects are not perfectly dull, most are not perfectly reflective, either. Light transmitted by specular reflection leaves the surface mostly, but not entirely, in the direction of the mirror angle q. Figure 16.7 shows light reflecting off an imperfectly reflective surface. The lengths of the arrows in the shaded region indicate the amount of light reflected in directions close to the mirror angle.
The amount of reflected light drops off very quickly as the direction moves away from the mirror angle. Figure 16.8 shows light reflecting off a surface toward a viewpoint. The viewpoint receives less reflected light than it would if it were directly in the mirror direction.
Bui-Tong Phong developed a model that approximates specular reflection using a term that involves Cosn(f). If n is large, Cosn(f) grows small very quickly as f increases. That makes most of the specularly reflected light move in directions close to the angle q, which agrees with the behavior of a good reflector.
For a perfect reflector, n is infinitely large. In that case Cosn(f) = 0, except when f = 0, in which case Cosn(f) = 1. That makes all of the reflected light follow the mirror angle.
When n is small, Cosn(f) does not decrease as quickly when f increases. That allows more reflected light at larger angles f. This produces a larger, less intense highlight on the surface.
Adding the new term for specular reflection to the shading model gives:
e10a6a0a59f035e870d90cca05b85fce.gif
I = Ia * ka +
    I
i * (Kd * (L  N) + ks * Cosn(f)) *
          (r
min + kdist) / (r + kdist)

 
< previous page page_571 next page >